<?php
use yii\helpers\Html;
use yii\widgets\DetailView;

$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'News', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
\yii\web\YiiAsset::register($this);
?>
<div class="news-view">
    <h1><?= Html::encode($this->title) ?></h1>
    <p>
        <?= HTML::a('Update',['update','news_id'=>$model->news_id],['class'=>'btn btn-primary']) ?>
        <?= HTML::a('Delete', ['delete', 'id' => $model->news_id], [
                'class' => 'btn btn-danger',
                'data' => [
                        'confirm' => 'Are you sure you want to delete this item?',
                        'method' => 'post',
],
])?>
    </p>

    <?= DetailView::widget([
            'model' => $model,
    'attributes' => [
            'news_id',
        'cateId',
        'news_title',
        'newImg',
        'news_company',
        'newsTime',
        'news_content',
        'Report_Mailbox',
        'like_count',
        'comment_count',
        'collect_count',
        'forward_count',
        'createTime',
        'updateTime',
    ]
])?>
</div>
